Enhanced deinterlacing using predictors from motion estimation engine

ABSTRACT

An apparatus and method for generating predictors performs motion estimation of a target macroblock in a target field against data segments in reference fields. The same motion estimation engine is used to perform various image processing operations to efficiently use resources of the apparatus. Different reference fields are used depending on modes of operation. In a deinterlacing mode, deinterlacing is performed using directional interpolation, recursive motion compensated deinterlacing, and motion adaptive deinterlacing.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority under 35 U.S.C. §119(e) to U.S.Provisional Patent Application No. 61/025,628 entitled “EnhancedDeinterlacing Using Predictors from Motion Estimation Engine,” filed onFeb. 1, 2008, which is incorporated by reference herein in its entirety.

BACKGROUND

1. Field of Art

The disclosure relates generally to performing motion compensateddeinterlacing, and more specifically to deinterlacing using acombination of directional interpolation, motion compensateddeinterlacing, and motion adaptive deinterlacing.

2. Description of Related Art

Motion compensation describes a target image in terms of which section(specifically, macroblock) of a target frame came from which section ofa reference frame. The motion compensation is often employed in videocompression as well as video processing such as deinterlacing, noisereduction, and video stabilization. In order to perform the motioncompensation, motion estimation must be performed before performing themotion compensation.

The motion estimation is the process of finding optimal or near-optimalmotion vectors of macroblocks in the frames of a video sequence. Whenusing the motion estimation, an assumption is made that objects in thescene have only translational motions. Under such an assumption, amacroblock of the frame is compared with macroblocks in the referenceframe to choose the best matching macroblock in the reference frame.Generally, the search for the macroblock is conducted over apredetermined search area (i.e., search window) of the reference frame.

The motion estimation is the most computationally demanding process inimage compression applications, and can require as much as 80% of theprocessor cycles spent in the video encoder. The simplest and mostthorough way to perform motion estimation is to evaluate every possiblemacroblock (e.g., 16×16 pixels) in the search window of the referenceframe, and select the best match. Typically, a sum of absolutedifferences (SAD) or sum of squared differences (SSD) computation isused to determine how closely the pixel region of the reference framematches a macroblock of the target frame. The SAD or SSD is oftencomputed for the luminance plane only, but can also include thechrominance planes. A relatively small search area of 48 pixels by 24pixels, for example, contains 1024 possible 16×16 pixel regions athalf-pixel resolution. Performing an SAD on the luminance plane only forone such region requires 256 subtractions, 256 absolute valueoperations, and 255 additions. Thus, not including the interpolationrequired for non-integer motion vectors, the SAD computations needed toexhaustively scan this search window for the best match require a totalof 785,408 arithmetic operations per macro block, which equates to over4.6 billion arithmetic operations per second at CIF (352 by 288 pixels)video resolution and a modest frame rate of 15 frames per second.

Accordingly, the motion estimation is a crucial operation in videocompression and processing. Software or hardware dedicated to performthe motion estimation has been developed and is called a motionestimation engine. The motion estimation engine is very crucial to theperformance of video compression and video processing. To enhanceaccuracy and speed, complex algorithms and dedicated circuits have beenemployed in the motion estimation engines.

SUMMARY

Embodiments disclose a motion estimation engine operable in variousmodes, each mode involving motion compensation. Depending on the mode ofoperation, the motion estimation engine retrieves reference frames indifferent temporal or spatial relationship with a target frame togenerate motion vectors or predictors based on the mode of operation.

In one example embodiment, an image processor is coupled to the motionestimation engine to perform deinterlacing, field noise reduction, orframe noise reduction. The image processor receives the predictors fromthe motion estimation engine and generates intermediate macroblocksbased on the predictors. The intermediate macroblocks are blended todeinterlace the target frame or reduce noise in the target frame.

In one example embodiment, directional interpolation, recursive motioncompensated deinterlacing, and motion adaptive deinterlacing are used incombination to deinterlace the target frame. For each pixel for missinglines in the target frame, it is determined whether to use a pixelgenerated using recursive motion compensated deinterlacing or a pixelgenerated using the motion adaptive deinterlacing. Then the chosen pixelis blended with a pixel generated by directional interpolation.

In one example embodiment, scene changes and/or telecine of the targetframe is detected to adjust the deinterlacing scheme accordingly. Thescene change and/or the telecine of the target frame may be detectedfrom a difference macroblock generated by subtracting the luminance(and/or chrominance) values of pixels in the target macroblock and thepredictors.

In one example embodiment, the recursive motion compensateddeinterlacing of the target frame is performed using an interlaced fieldof a first previous frame (preceding the target frame) and a noisereduced field of the first previous frame when a scene change is notdetected in the target frame or the first previous frame. The noisereduction can be performed simultaneously on the target frame by usingthe noise reduced field of the first previous frame. The motion adaptivedeinterlacing of the target frame is performed using a second previousframe (preceding the first previous frame), the first previous frame,and a first subsequent frame (subsequent to the target frame).

The features and advantages described in the specification are not allinclusive and, in particular, many additional features and advantageswill be apparent to one of ordinary skill in the art in view of thedrawings, specification, and claims. Moreover, it should be noted thatthe language used in the specification has been principally selected forreadability and instructional purposes, and may not have been selectedto delineate or circumscribe the inventive subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

The disclosed embodiments have other advantages and features which willbe more readily apparent from the detailed description, appended claims,and accompanying drawings. The drawings or figures (FIGS.) include:

FIG. 1 is a block diagram illustrating an embodiment of a mediaprocessor.

FIG. 2 is a block diagram illustrating in detail an embodiment of anencoder/transcoder, an image processor and memory.

FIG. 3 is a block diagram illustrating an embodiment of a motionestimation engine.

FIG. 4 is a block diagram illustrating an embodiment of an imageprocessor for performing deinterlacing.

FIG. 5 is a block diagram illustrating an embodiment of a directionalinterpolation module.

FIG. 6 is a block diagram illustrating an embodiment of a recursivemotion compensated deinterlacing module.

FIG. 7 is a block diagram illustrating an embodiment of a motionadaptive deinterlacing module.

FIG. 8 is a block diagram illustrating an embodiment of a selector.

FIG. 9A is a diagram illustrating reference frames for deinterlacing atarget frame when a scene change is not detected in the target frame orin a first previous frame, according to an embodiment.

FIG. 9B is a diagram illustrating reference frames for deinterlacing atarget frame when a scene change is detected in the target frame,according to an embodiment.

FIG. 9C is a diagram illustrating reference frames for deinterlacing atarget frame when a scene change is detected in a first previous frame,according to an embodiment.

FIG. 10 is a flow chart illustrating a method of operating a mediaprocessor in different operating modes, according to an embodiment.

FIGS. 11A and 11B are flow charts illustrating a method of deinterlacingan interlaced frame, according to an embodiment.

FIG. 12 is a flow chart illustrating in detail the process ofdetermining reference frames, shown in FIG. 11A.

FIG. 13 is a flow chart illustrating in detail the process of performingmotion estimation, shown in FIG. 11A.

FIG. 14 is a flow chart illustrating in detail the process of decidingbetween a pixel generated by recursive motion compensated deinterlacingand a pixel generated by motion adaptive deinterlacing, according to anembodiment.

FIG. 15 is a flow chart illustrating in detail the steps for performingnoise reduction, shown in FIG. 12A.

FIG. 16 is a block diagram illustrating an embodiment of a motionestimation engine for performing field noise reduction.

FIG. 17 is a block diagram illustrating an embodiment of an imageprocessor for performing field noise reduction.

FIG. 18 is a block diagram illustrating an embodiment of a motionestimation engine for performing frame noise reduction.

FIG. 19 is a flow chart illustrating a method for performing the fieldnoise reduction or the frame noise reduction, according to anembodiment.

DETAILED DESCRIPTION

The embodiments described herein will be with reference to theaccompanying drawings. Like reference numerals are used for likeelements in the accompanying drawings.

In embodiments described herein, a media processor performs motionestimation based operations including encoding, deinterlacing, and noisereduction using a motion estimation engine. The same motion estimationengine is used in the media processor to perform multiple types ofoperations associated with motion estimation, and thereby moreefficiently use the resources of the media processor. The motionestimation engine provides predictors for performing motion compensateddeinterlacing, and motion compensated noise reduction. The deinterlacingmay be performed by generating pixels for the deinterlaced field of anew target frame, and the noise reduction is performed on the pixels ofinterlaced fields of the target frame. The noise reduction may beperformed by blending pixels of the interlaced field of a target framewith pixels of the predictors generated by the motion estimation engine.

A frame describe herein refers to an image in a moving picture. Theframe can be an interlaced frame that includes interlaced fields of oddor even horizontal lines separated in time. Alternatively, the frame canbe a deinterlaced or progressive frame in which the image has both oddand even horizontal lines at the same point in time. An interlaced frameincludes two fields (hereinafter referred to as two “interlaced field”,each of which is an image having only odd or even lines.

Deinterlacing comprises the process of generating a field (hereinafterreferred to as a “deinterlaced field”) with horizontal lines not presentin the target interlaced field of an interlaced frame. The deinterlacingcan be performed using various methods including, among other methods,directional interpolation, recursive motion compensation, and a motionadaptive method. The interlaced field and the deinterlaced field arecombined to form a deinterlaced or progressive frame.

A target frame comprises a frame that is currently being processed bythe image processor. A new field for the target frame may be generated(e.g., deinterlacing) or processed (e.g., noise reduction) to modifydata already present in the target frame. A reference frame is arelative concept to the target frame. The reference frame is a frame(either deinterlaced or interlaced) used for processing the targetframe. The reference frame can be a frame preceding the target frame orit can be a frame subsequent to the target frame.

A field and a frame are hereinafter collectively referenced as an image.For a deinterlaced frame, the image includes the interlaced field andthe generated deinterlaced field. The target image is the image that iscurrently being processed by the image processor. The reference image isa relative concept to the target image and is used for processing thetarget image.

A data segment refers to data for a portion of the target or referenceframe. A data segment includes data for pixels within a certain regionof an image. Data segment includes, for example, a macroblock and awindow of pixels among others. The macroblock or the window of pixelscan include a fixed number of pixels (e.g., 16×16 pixels) or can have avariable number of pixels.

Overview of the Architecture

Figure (FIG.) 1 is a block diagram illustrating an embodiment of a mediaprocessor 100. The media processor 100 is coupled to memory 190 toreceive unprocessed images and send processed images for storing on thememory 190. The media processor 100 includes, among other components, adecoder 120, a scaler 140, an encoder/transcoder 160, and an imageprocessor 180. The media processor 100 performs various operationsincluding, among other operations, encoding, transcoding, deinterlacing,and noise reduction. The transcoding is performed by the decoder 120,the scaler 140, and the encoder/transcoder 160. The deinterlacing andthe noise reduction are performed by modules including, among othermodules, the encoder/transcoder 160, and the image processor 180.

Although the media processor 100 is shown in FIG. 1 as being coupled tothe memory 190, it is possible to couple the media processor 100directly to media devices such as a camcorder or a digital videorecorder (DVR) to receive a video sequence. In another embodiment, theoutput from the media processor 100 is coupled directly to a screendevice (e.g., a screen or a monitor) to provide the video sequencedirectly to the display device. When directly coupling the mediaprocessor 190 with the media devices, it may be necessary to include acache memory device in the media processor 100 to store reference framesneeded for processing the target frames.

The decoder 120 decodes video sequence data stored on the memory 190 togenerate decoded images of the video sequence. The scaler 140 is coupledto the decoder 120 for changing the resolution of the decoded images(e.g., High Definition (HD) resolution to Standard Definition (SD)resolution). The decoder 120, the scaler 140, the encoder/transcoder160, and the image processor 160, whether alone or in combination withother modules, can be implemented, for example, in software, hardware,firmware or any other combination thereof.

The memory 190 stores, among other data, images for processing andimages processed by the media processor 100. In one embodiment, thememory 190 is implemented by, for example, a double-data-ratesynchronous dynamic random access memory (DDR2 SDRAM). The memory 190may be coupled to other modules or devices (not shown) to receive theunprocessed images and transmit the processed images.

In the following, components of the encoder/transcoder 160 and the imageprocessor 180 will be explained further with reference to FIGS. 2 to 8.For the purpose of explanation, the function and operation of thecomponents of the media processor 100 will be described with referenceto the deinterlacing mode, specifically when scene changes are notdetected in the target frame Frame(N) or the first previous frameFrame(N−1) preceding the target frame. The function and operation of thecomponents of the media processor 100 when scene changes are detected inthe target frame Frame(N) or the first previous frame Frame(N−1) will bedescribed below in detail with reference to FIGS. 9B and 9C. Also, thefunction and operation of the components of the media processor 100 whenthe media processor 100 is operating in a noise reduction mode will beexplained in detail with reference to FIGS. 16 to 18.

FIG. 2 is a block diagram illustrating in detail an embodiment of asubsystem for performing operations based on the motion estimation thatincludes, for example, the encoder/transcoder 160, the image processor180, and the memory 190. The encoder/transcoder 160 includes, amongother modules, encoding/transcoding modules 220, a macroblock fetcher210, and a motion estimation engine 230. The macroblock fetcher 210 iscoupled to the memory 190 to retrieve a macroblock (hereinafter referredto as a “target macroblock 252”) of the input field F(N). The targetmacroblock 252 consists of pixels from the luminance and/or chrominanceplanes.

In an encoding/transcoding mode, the macroblock fetcher 210 feeds thetarget macroblock 252 for encoding or transcoding to theencoding/transcoding modules 220 (shown as a dashed line). In theencoding/transcoding mode, the motion estimation engine 230 retrieves afirst set of reference frames from the memory 190 and performs themotion estimation based on the first set of reference frames. The motionestimation engine 230 provides a motion vector 260 (shown as a dashedline) to a motion compensation module 222 of the encoding/transcodingmodules 220 to encode the target frame along with the predictor andresidual 261 (shown as a dashed line) to the encoding/transcodingmodules 220.

In the deinterlacing mode and the noise reduction mode, the macroblockfetcher 210 retrieves and feeds the target macroblock 252 to the motionestimation engine 230. The motion estimation engine 230 retrieves asecond or a third set of reference frames and performs motion estimationbased on these reference frames, as explained below in detail withreference to FIG. 10. The motion estimation engine 230 then providespredictors to the image processor 180 via a bus 254.

Continuing reference to FIG. 2, the memory 190 has allocated memoryspace for data including, among other data, a noise reduced processedsecond previous field F_(NR)(N−2) 242, a target field F(N) 244, agenerated deinterlaced field of a first previous output frameF_(DI)(N−1) 246, a noise reduced processed field of a first previousoutput frame F_(NR)(N−1) 248, a first subsequent field F(N+1) 250, agenerated deinterlaced field of the target output frame F_(DI)(N) 253, anoise reduced processed field of the target output frame F_(NR)(N) 254.The first previous output frame Frame(N−1) includes the noise reducefield F_(NR)(N−1) 248, and the deinterlaced field F_(DI)(N−1) 246. Afterdeinterlacing, the target output frame includes the deinterlaced fieldF_(DI)(N) 253 and the noise reduced field F_(NR)(N) 254. Beforedeinterlacing, the target output frame includes only an interlaced fieldF(N) 244. The second previous output frame includes, the deinterlacedfield (not shown) and the noise reduced field F_(NR)(N−2) of the secondprevious frame. A subsequent frame includes the interlaced field F(N+1).As shown by the arrows between the fields, after a cycle ofdeinterlacing a target frame, F_(NR)(N−1) 248 becomes F_(NR)(N−2) 242,F(N+1) 250 becomes F(N) 244, F_(DI)(N) 253 becomes F_(DI)(N−1) 246, andF_(NR)(N) 254 becomes F_(NR)(N−1) 248. The number of frames doubles frominput to output for deinterlacing as the deinterlacing functioneffectively converts fields into frames.

In one embodiment, different reference pictures are retrieved from thememory 190 depending on the operation being performed by the mediaprocessor 100. In the encoding/transcoding mode, one reference picturefrom the memory 190 can be retrieved and fed to the motion estimationengine 230 to generate a motion vector for a P-picture. Two referencepictures can be retrieved from the memory 190 and provided to the motionestimation engine 230 to generate a motion vector for a B-picture.

In one embodiment, the image processing mode includes, among othermodes, a deinterlacing mode, a field noise reduction mode, and a framenoise reduction mode. In the deinterlacing mode, the motion estimationengine 230 retrieves a previous deinterlaced frame and variousinterlaced fields to deinterlace the target field F(N). The usedreference fields differ depending on whether scene changes are detectedin the target field or the first previous field (preceding the targetfield), as explained in detail with reference to FIGS. 9A to 9C. In thefield noise reduction mode, a MP_(FD) predictor is generated by themotion estimation engine 230 using an interlaced field of a firstprevious field and an interlaced second previous field, as describedbelow in detail with reference to FIG. 16. In the frame noise reductionmode, a MP_(FM) predictor is generated by the motion estimation engine230 using a previous deinterlaced frame, as described below in detailwith reference to FIG. 18.

Motion Estimation Engine

FIG. 3 is a block diagram illustrating an embodiment of a motionestimation engine 230. The motion estimation engine 230 includes, amongother components, a macroblock buffer 310, a search module 320, apredictor generator 330, a rolling search buffer 350, and a searchbuffer fetcher 360. The rolling search buffer 350 includes a firstrolling buffer 352 and a second rolling buffer 354. The motionestimation engine 230 performs block matching between the targetmacroblock 252 and the data segments stored in the rolling search buffer350. The block matching process identifies a block of pixels of thereference fields as a matching pixel (MP) predictor 332 and anin-between pixel (IP) predictor 334 for describing the current targetmacroblock 252.

To identify the proper MP and IP predictors, the target macroblock 252is fetched by the macroblock fetcher 210 and sent to the macroblockbuffer 310. The macroblock buffer 310 also sends the target macroblock252 to modules of the image processor 180 via a bus 254. Data segmentsfrom the deinterlaced field F_(DI)(N−1) of the first previous outputframe and data segments from the noise reduced field F_(NR)(N−1) of thefirst previous output frame are retrieved by the search buffer fetcher360 and stored in the first rolling buffer 352 and the second rollingbuffer 354, respectively.

The search module 320 then compares the target macroblock 252 with thedata segments in the first and second search buffers 352, 354. The sizeof data segment stored in the first rolling buffer 352 and the size ofthe data segment stored in the second rolling buffer 354 are larger thanthe size of the target macroblock 252. The data segments in the firstand second rolling buffers 352, 354 are the regions of the deinterlacedfield F_(DI)(N−1) of the first previous output frame and the noisereduced field F_(NR)(N−1) of the first previous output frame on whichthe block matching of the target macroblock 252 is performed.

The in-between pixel (IP) predictor contains pixels that are verticallyin between the pixels from the matching pixel (MP) predictor when thetwo reference fields F_(DI)(N−1) and F_(NR)(N−1) are combined as aframe. This also applies to sub-pixel positioning of the MP and IPpredictors. The IP predictor starts one line above the MP predictor ifthe target field F(N) is a bottom field, and the IP predictor starts oneline below the MP predictor if the target field F(N) is a top field.

In one embodiment, the search module 230 performs a full-pel search bycomputing sums of absolute differences (SAD) or sums of squareddifferences (SSD) between the pixels of the target macroblock 252, andthe pixels stored in the first and second rolling buffers 352, 354 atvarious offsets to generate a motion vector for the MP and IP predictorgenerators 332 and 334. The smaller the SAD or SSD, the better the matchbetween the target macroblock 252 and the block of pixels of the datasegments in the rolling search buffer 350. The search module 320 keepstrack of the smallest SAD or SSD computed during the full-pel searchprocess to determine the block of pixels at the offset location of thedata segments in the rolling search buffer 350 that best matches thetarget macroblock 252.

After the full-pel search, a sub-pel search is performed to obtain amore accurate non-integer offset value between the target macroblock 252and the best matching block of pixels in the rolling search buffer 350to generate a motion vector for the predictor 330. The motion vector isfed to the predictor generator 330 via a bus 362. Theencoding/transcoding mode, the search module 320 sends a motion vector260 indicating vertical and horizontal pixel offset between the targetmacroblock 252 and the best matching block of pixels in the rollingsearch buffer 350 to the motion compensation module 222 of theencoding/transcoding modules 220. In the encoding/transcoding mode, theMP predictor 332 and the IP predictor 334 along with the residual 261are sent to the encoding/transcoding modules 220.

The predictor generator 330 coupled to the search module 320 generatestwo predictors based on the motion vector, and the data segments storedin the rolling search buffer 350. Specifically, based on the motionvector from the search module 320 and the pixels in the rolling searchbuffer 350, the predictor generator 330 generates the MP predictor 332and the IP predictor 334. The predictor generator 330 also generates amotion vector zero (MVZ) macroblock 336 which is a block of pixels fromF_(NR)(N−1) 248 representing a motion vector of zero in the oppositefield.

In the deinterlacing mode, the target macroblock 252, the MP predictor332, the IP predictor 334, and the MVZ macroblock 336 are sent to theimage processor 180 via the bus 254. Although the sub-pel search wasperformed in this embodiment, only the full-pel search may be performed.

Image Processor

FIG. 4 is a block diagram illustrating an embodiment of an imageprocessor 180. The image processor 180 includes, among other modules, adirectional interpolation (DRIN) module 420, a recursive motioncompensated deinterlacing (RMCD) module 430, a motion adaptivedeinterlacing (MAD) module 440, a multiplexer 450, an interleaver 470, ascene change detector 490, a selector 460, an alpha blender 480, and awriter 492. The DRIN module 420 receives the target macroblock 252 viathe bus 252 from the motion estimation engine 230 and outputs adirectionally interpolated (DI) macroblock 422, as explained in detailbelow with reference to FIG. 5. The DRIN macroblock 422 includes twicethe number of pixels of the target macroblock 252. For example, if thetarget macroblock 252 has 16×16 pixels, the DRIN macroblock 422 has16×32 pixels because the DRIN macroblock 422 includes the pixels of thedeinterlaced lines.

The RMCD module 430 receives the target macroblock 252, the MP predictor332, and the IP predictor 336, and outputs a recursive motioncompensation deinterlaced (RMCD) macroblock 424 to the multiplexer 450,as explained in detail below with reference to FIG. 6. The RMCDmacroblock 424 has only the pixels for the deinterlaced lines; and thus,the RMCD macroblock 424 has the same number of pixels as the targetmacroblock 252. For example, if the target macroblock 252 has 16×16pixels, the RMCD macroblock 424 also has 16×16 pixels.

The MAD module 440 receives the MVZ macroblock 336 and outputs a motionadaptive deinterlaced (MAD) macroblock 426 to the multiplexer 450. TheMAD macroblock 426, like the RMCD macroblock 424, includes only thepixels for the deinterlaced lines; and thus, the MAD macroblock 426 hasthe same number of pixels as the target macroblock 252. For example, ifthe target macroblock 252 has 16×16 pixels, the RMCD macroblock 424 alsohas 16×16 pixels. The number of pixels for various types of macroblocksis shown in FIG. 4 for purpose of explanation, and a different number ofpixels may be used for each macroblock.

In the deinterlacing mode, the selector 460 determines, for each pixelin the lines of the deinterlaced field, whether to use a pixel from theRMCD macroblock 424 or to use a pixel at the corresponding location ofthe MAD macroblock 426, as explained below in detail with reference toFIG. 8. The selector 460 sends a multiplexer control signal 451instructing whether the multiplexer 450 should choose the pixel from theRMCD macroblock 424 or the corresponding pixel from the MAD macroblock426 to generate a multiplexer macroblock 428. The multiplexer macroblock428 includes the same number of pixels as the target macroblock 252. Forexample, if the target macroblock 252 has 16×16 pixels, the multiplexermacroblock 428 also has 16×16 pixels. Each module of the image processor180, whether alone or in combination with other components, can beimplemented for example, in software, hardware, firmware or any othercombination thereof.

In the deinterlacing mode, the multiplexer macroblock 428 assembled fromthe RMCD macroblock 424 and the MAD macroblock 426 as selected by theselector 460 is fed to the interleaver 470. The interleaver 470 theninterleaves the multiplexer macroblock 428 with the MP predictor 332 togenerate an interleaved macroblock 442. Specifically, the interleaver470 weaves lines of the multiplexer macroblock 428 into odd lines (oreven lines), and lines of the MP predictor 332 into even lines (or oddlines) of the interleaved macroblock 442. The interleaved macroblock 442includes twice the number of pixels compared to the target macroblock252 because the interleaved macroblock 442 includes the deinterlacedlines. For example, if the target macroblock 252 has 16×16 pixels, theinterleaved macroblock 442 has 16×32 pixels.

The alpha blender 480 includes, among other modules, a noise calculationmodule 482 and a look-up table 484 for determining an alpha value forblending the DRIN macroblock 422 and the interleaved macroblock 442. Inthe deinterlacing mode, the noise calculation module 482 of the alphablender 480 receives a difference macroblock 444 (described below indetail with reference to FIG. 9) from the RMCD module 430 and calculatesnoise in the target macroblock 252. The noise calculation module findsthe minimum SAD for macroblock 444 across the entire target field F(N)because uniform noise causes a constant error to the motioncompensation.

Based on the noise calculated by the noise calculation module 482 andthe error macroblock 461 from selector 460, the alpha value for thepixel is decided from the look-up table 484. Specifically, the look-uptable 484 stores alpha values corresponding to a certain value of noisein the target macroblock 252 and the amount of error on a per pixelbasis from the error macroblock 461. Increased noise in the video meanseither that the alpha value is selected to give a higher weight topixels from the RMCD module 430 or that the MAD module 440 needs toallow a bigger per pixel error in the macroblock 461. The alpha valuethus determined is used for blending the DRIN macroblock 422 and theinterleaved macroblock 442 with weights for each pixel determined by thealpha value. A blended macroblock 446 is generated by the alpha blender480 as a result and is provided to the writer 492.

The look-up table 484 can be replaced with a processing modulegenerating the alpha value in accordance with a predetermined algorithmbased on the noise calculation from the difference macroblock 444 andthe error macroblock 461. Each module of the alpha blender 480, whetheralone or in combination with other components, can be implemented forexample, in software, hardware, firmware or any other combinationthereof.

In the deinterlacing mode, the writer 492 then divides up the blendedmacroblock 446 into a deinterlaced macroblock 448 and a noise reducedmacroblock 450. The deinterlaced macroblock 448 includes the horizontallines that were missing from the target field F(N); and thus, thedeinterlaced macroblock 448 forms part of the deinterlaced fieldF_(DI)(N) of the target output frame Frame(N). The noise reducedmacroblock 450 includes the horizontal lines already present in thetarget field F(N), but with reduced noise. The noise reduction occurs inthe course of blending the DRIN macroblock 422 with the interleavedmacroblock 442. Specifically, the noise reduction is a motioncompensated noise reduction because the MP predictor 332 is blended withthe target macroblock 252. The noise reduced macroblock 450 is stored inthe memory 190 as part of the noise reduced field F_(NR)(N) of thetarget output frame Frame(N).

The scene change detector 490 receives the difference macroblock 444,which is the pixel differences between the MP predictor 332 and thetarget macroblock 252, from the RMCD module 430. The scene changedetector 490 calculates the motion compensated sum of absolutedifferences (SAD) between the entire target field F(N) and the previousfield F(N−1). When the total SAD value for the entire field exceeds apredetermined value, the scene change 490 determines that a scene changehas occurred and a scene change flag indicative of the scene change isstored in the scene change detector. The scene change flag may be readby a device controller (not shown) coupled to the media processor 100 toinstruct the motion estimation engine 230 and the image processor 180 toperform deinterlacing as explained in detail below with reference toFIGS. 9A to 9C.

FIG. 5 is a block diagram illustrating an embodiment of a DRIN module420. The DRIN module 420 includes a directionally interpolatedmacroblock generator 520 and a DRIN interleaver 540. The directionallyinterpolated macroblock generates an intermediate macroblock 530, forexample, as described in Vishal Markandey et al. “Motion AdaptiveDeinterlacer for DMD (Digital Micromirror Device) Based DigitalTelevision,” in IEEE Transactions on Consumer Electronics, pp. 735-742,August 1994, which is incorporated by reference herein in its entirety.The method described in the reference is similar to what is used in thisembodiment except that the filter is 5 pixels wide instead of 3 pixels.

In the directionally interpolated macroblock generator 520, thedifferences of pixel pairs of the target macroblock 252 are calculatedand the pair with the smallest difference is selected. The pair is theninterpolated to generate a pixel of an intermediate directionallyinterpolated (DI) macroblock 530. The DRIN interleaver 540 weaves linesof the intermediate DRIN macroblock 530 into odd lines (or even lines),and lines of the target macroblock 252 into even lines (or odd lines) ofthe DRIN macroblock 530 to obtain the DRIN macroblock 422. The DRINmacroblock 422 is then fed into the alpha blender 480. Each module ofthe DRIN module 420, whether alone or in combination with othercomponents, can be implemented for example, in software, hardware,firmware or any other combination thereof.

FIG. 6 is a block diagram illustrating an embodiment of the RMCD module430. The RMCD module 430 includes, among other modules, a differencer640, a vertical interpolator 660, and an adder 680. The differencer 640generates the difference macroblock 444 in the luminance and chrominanceplanes by subtracting the luminance and chrominance values of pixels ofthe MP predictor 332 from the luminance and chrominance values of thecorresponding pixels of the target macroblock 252. The verticalinterpolator 660 then interpolates the difference pixels in thedifference macroblock 444 between a first line with pixels with a secondline below (or above) the first line. The generated interpolated pixelsform an interpolated difference macroblock 624. The adder then adds theIP predictor 334 to the interpolated difference macroblock 624 togenerate the RMCD macroblock 424. The RMCD macroblock 424 is then sentto the multiplexer 450. The RMCD macroblock 424 has the same number ofpixels as the target macroblock 252. For example, if the targetmacroblock 252 has 16×16 pixels, the RMCD macroblock 424 also has 16×16pixels. Each module of the RMCD module 430, whether alone or incombination with other components, can be implemented for example, insoftware, hardware, firmware or any other combination thereof.

FIG. 7 is a block diagram illustrating an embodiment of the MAD module440. The MAD module 440 generates a MAD macroblock 426 by averaging theMVZ macroblock 336 and a macroblock from the next field F(N+1). Theaveraging operation achieves noise reduction. In the deinterlacing mode,a pixel in the MAD macroblock 426 is more appropriate than the RMCDmacroblock 424 when the pixel is part of a still image in the videosequence. The MAD module includes, among other modules, a still blender740 and a next field fetcher 720. The next field fetcher 720 fetches anext macroblock 724 from a location of the subsequent interlaced fieldF(N+1) that corresponds to the MVZ macroblock 336. The next macroblock724 is then averaged with the MVZ macroblock 336 by the still blender740 to reduce noise. The next macroblock 724 is also sent to theselector 460. Note that the MVZ macroblock 336 and the next macroblock724 are both from fields opposite to the target macroblock 252. The MADmacroblock 426 has the same number of pixels as the target macroblock252. For example, if the target macroblock has 16×16 pixels, the MADmacroblock 426 also has 16×16 pixels.

FIG. 8 is a block diagram illustrating an embodiment of the selector460. The selector 460 includes, among other modules, a RMCD errorcalculator 820, a first window comparator 830, a second pixel windowcomparator 840, a selector fetcher 850, a switching module 880, an MADerror selector 860, and a telecine detector 870. In one embodiment, theRMCD error calculator 820 calculates a RMCD error 822 for each pixel inthe RMCD macroblock (hereinafter referred to as a target pixel) based onthe difference macroblock 444. The RMCD error 822 represents thedeviation of the nearby pixels in the MP predictor 332 from thecorresponding pixels in the target macroblock 252. The higher the RMCDerror 822 for a given pixel, the less likely that the correspondingpixel in the RMCD macroblock 424 will be appropriate compared to acorresponding pixel in the MAD macroblock 426. As explained below,pixels in the MAD macroblock 426 are more appropriate than the pixels inthe RMCD macroblock 424 when the pixels are part of a still image of thevideo sequence.

The selector fetcher 850 retrieves a second previous macroblock 826 fromthe noise reduced field F_(NR)(N−2) of the second previous field andprovides the second previous macroblock 826 to the second windowcomparator 840. The location of the second previous macroblock 826 inthe second previous field is the same as the location of the targetmacroblock 252 in the target interlaced field F(N).

In one embodiment, the RMCD error 822 is calculated from a maximumdifference 822 of pixels of the target macroblock and correspondingpixels of the MP predictor 332 across a five-pixel window. Specifically,the RMCD error calculator 820 calculates the RMCD error 822 of a targetpixel from the maximum difference of the following five pixels: thetarget pixel, two pixels to the left of the target pixel, and two pixelsto the right of the target pixel. If pixels to the left or right areunavailable because the pixels go beyond what is provided by thedifference 444, then the closest available pixels are duplicated as asubstitute. By using the maximum difference across five pixels, the RMCDerror can be more accurately determined even if there is an aberrationor noise in the target pixel. The maximum difference of the five-pixelwindow can be calculated conveniently from the difference macroblock444. The RMCD error 822 is sent to the switching module 880 forcomparison with an MAD error 824, as explained below.

For a target pixel, the first window comparator 830 obtains a firstdifference 832 which is the maximum difference between pixels in atarget window of the MVZ macroblock 336 and the corresponding pixels ina next field window of the next macroblock 724. The target field windowincludes the target pixel, two pixels to the left of the target pixel,and two pixels to the right of the target pixel. If pixels to the leftor right are unavailable because the pixels go beyond what is providedby the difference 832, then the closest available pixels are duplicatedas a substitute. The second window comparator 840 calculates a seconddifference 842 between the target field window and a second previousfield window including pixels of the second previous macroblock 826 atlocations corresponding to the physical pixel locations directly aboveand below the pixels in the target field window. The second windowcomparator 840 compares the locations above and below the target pixeland passes the larger value on as the second difference 842. The MADerror selector 860 chooses the higher value of the first difference 832and the second difference 842 as the MAD error 824 for that target pixelincluding two pixels to the left and two pixels to the right. If pixelsto the left or right are unavailable because they go beyond what isprovided by the difference 832 or 842, then the closest available pixelsare duplicated as a substitute. The MAD error 824, for each pixel,represents the maximum difference in a 5 pixel window between the pixelsof the MVZ macroblock 336 and the corresponding pixels in the next fieldF(N+1) and the maximum difference in a 5 pixel window for the pixel rowsabove and below the target pixel location between the target macroblock252 and the noise reduced field F_(NR)(N−2).

The switching module 880 compares the RMCD error 822 and the MAD error824 on a pixel by pixel basis. Then the switching module 880 sends amultiplexer control signal 882 to the multiplexer 450 and the finalerror signal 461 to the alpha blender 480. If the RMCD error 822 issmaller than the MAD error 824, the pixel in the RMCD macroblock 424 isselected as the pixel for the target pixel of the multiplexer macroblock428. Conversely, if the RMCD error 822 is greater than or equal to theMAD error 824, the pixel of the MAD macroblock 426 is selected as thepixel for the target pixel of the multiplexer macroblock 428. Byselecting every target pixel from the macroblocks 424, 426 in accordancewith the RMCD error 822 and the MAD error 824, each pixel of the missingline in the target frame F(N) is adaptively selected. That is, when thetarget pixel is part of a moving picture, the pixels in the RMCDmacroblock 424 is generally selected whereas when the target pixel ispart of a still picture, the pixels in the MAD macroblock 426 isgenerally selected. The 5 pixel window advantageously reduces artifactsdue to a single pixel impulse condition. The final error for the pixelselected is passed to the alpha blender so that a final decision can bemade on the amount of blending between the best RMCD or MAD temporallycalculated pixel and the DRIN or directionally interpolated spatiallycalculated pixel for the generated deinterlaced pixels.

As explained above with reference to FIG. 4, the alpha blender 480 thenblends the DRIN macroblock 422 with the interleaved macroblock 442 usingthe alpha value stored in the look-up table 484. The deinterlacing andthe noise reduction are performed on the same macroblock where theoperation performed changes from line to line in the output macroblock446. On each line, either deinterlacing is performed for the generatedlines or noise reduction is performed for the existing lines. But bothoperations are not performed on the same line.

By blending the DRIN macroblock 422 and the interleaved macroblock 442,the target macroblock 252 is deinterlaced and noise reduced.Accordingly, a separate pass to reduce noise in the target field neednot be performed, additionally saving time and resources required forperforming the noise reduction. The noise reduction performed on thetarget macroblock 252 is the field noise reduction. Therefore, thedeinterlacing mode explained above includes both deinterlacing and thefield noise reduction, but is referred herein as the deinterlacing modefor the sake of convenience. The field noise reduction mode performingonly the field noise reduction is described below in detail withreference to FIG. 10.

Referring back to FIG. 8, the telecine detector 870 detects whether thevideo sequence includes telecine processed moving pictures. Telecineprocessed frames can be deinterlaced perfectly because the sourcematerial is already progressive. Therefore, once the target field F(N)and reference fields are determined to be part of telecine processedmoving pictures, the telecine algorithm is used in place of thedeinterlacing method described herein. The telecine algorithm detectsrepeated fields and recombines matching fields to produce the originalprogressive frames. The telecine detector 870 determines and stores themaximum of an 8×8 pixel SAD between the target macroblock 252 and thesecond previous macroblock 826 as well as between the MVZ macroblock 336and the next field macroblock 724. Software looks at the results anddetermines if a telecine algorithm should be used across the entirefield by comparing the 8×8 SAD values with a threshold.

Different algorithms or methods may be used to calculate the RMCD error822 and the MAD error 824. For example, a longer or shorter version ofthe target window, the next field window and the previous field windowmay be used. Also, a different algorithm may be used for detecting thetelecine processed macroblocks. The modules in the selector 460, whetheralone or in combination with other modules, can be implemented forexample, in software, hardware, firmware or any other combinationthereof.

Reference Frames in the Deinterlacing Mode in Accordance with SceneChange Detection

In FIGS. 9A to 9C, each box represents an output deinterlaced frame ofthe video sequence. The rows of each box represent horizontal lines ofthe frame, each horizontal line having a thickness of one-pixel in thevertical direction. The rows hashed in one direction represent theodd-numbered horizontal lines of the frame while the rows hashed in theother direction represent the even-numbered horizontal lines of theframe. Lines not hashed are lines missing from the field, which are tobe generated by deinterlacing.

FIG. 9A is a diagram illustrating reference frames for deinterlacing atarget frame 940A when a scene change is not detected in the targetframe 940A and a frame 930A (preceding the target frame 940A). When thescene change is not detected, the deinterlacing is performed accordingto the process described above with reference to FIGS. 2 to 8.Specifically, the deinterlacing of the target frame 940A is performedusing the noise reduced field F_(NR)(N−1) and the deinterlaced fieldF_(DI)(N−1) of the first previous frame Frame(N−1), the noise reducedfield F_(NR)(N−2) of the second previous output frame 920A (precedingthe first previous frame 930A), the interlaced field of the firstsubsequent input and future output frame 950A.

Referring to FIG. 9A, the directional interpolated deinterlacing isperformed by the DRIN module 420 (refer to FIG. 5) using the interlacedfield of the target output frame Frame(N). For example, a directionallyinterpolated line for a missing line 942 a is generated from aninterlaced line 944 a, and the last line from the macroblock above whichis stored in a line buffer, directionally interpolated pixels in amissing line 942 b are generated from pixels in interlaced lines 944 a,944 b, and directionally interpolated pixels for missing line 942 c aregenerated from pixels in interlaced lines 944 b, 944 c as explainedabove with reference to FIGS. 4 and 5. The recursive motion compensateddeinterlacing (RMCD) is performed by the RMCD module 430 (refer to FIG.6) using the noise reduced field F_(NR)(N−1) and the deinterlaced fieldF_(DI)(N−1) of the first previous output frame 930A. The motion adaptivedeinterlacing is performed by the MAD module 440 (refer to FIG. 7) usingthe noise reduced field F_(NR)(N−2) of the second previous frame 920A,the noise reduced field F_(NR)(N−1), the target field F(N), and theinterlaced field of the first subsequent output frame 950A.

With respect to the target field F(N) of the target output frame 940A, anoise reduction process (NR) is performed using the noise reduced fieldF_(NR)(N−1) and the deinterlaced field F_(DI)(N−1) of the first previousframe 930A. As explained above with reference to FIG. 4, the noisereduction is achieved by blending every other row of pixels in the DRINmacroblock 422 with the corresponding pixels in the interleavedmacroblock 442 in the alpha blender 480. The pixels in the interleavedmacroblock 442 are motion compensated, creating a motion compensatedtemporal noise filter.

FIG. 9B is a diagram illustrating reference fields for deinterlacing atarget output frame 940B when a scene change is detection in a targetfield F(N). When the scene change is detected in the target field F(N),there is no previous relevant output frame with which to perform therecursive motion compensated deinterlacing, the motion adaptivedeinterlacing or the noise reduction because the target output frame940B does not resemble the previous frames. Only the directionallyinterpolated deinterlacing and the motion adaptive deinterlacing areperformed on the target output frame 940B based on the interlaced fieldF(N+1) of a subsequent output frame 950B, the interlaced field F(N+2) ofa second subsequent output frame 960B (following a first subsequentframe 950B), the interlaced field F(N+3) of a third subsequent outputframe 970B (following the second subsequent frame 960B), and theinterlaced field of the target frame 940B.

When the scene change is detected in the target frame 940B, the DRINmacroblock 422 and the MAD macroblock 440 are generated. The RMCDmacroblock 430 is not generated. The deinterlaced lines of the DRINmacroblock 422 and the MAD macroblock 442 are blended using the alphavalue that is determined by the noise calculation 482 and the pixelerror macroblock 461, as described above in detail. The noise reducedlines of the output macroblock 446 is set by default to the targetmacroblock 252 lines (interleaved into macroblock 422 by the DRIN module420). Because of this, these lines are not noise reduced for the scenechange case. The process of generating the DRIN macroblock 422 and theprocess of generating the MAD macroblock 426 are substantially the sameas explained above with reference to FIGS. 4 and 5, respectively.

To perform motion adaptive deinterlacing when the scene change isdetected in the target frame 940B, only target and subsequent fields areavailable and used to detect non-moving pixels for the deinterlacedfield. This shifts the MAD checked pixel by one output frame positionlater, but only when a scene change occurs. The MAD macroblock 426 isthen provided to the multiplexer 450 where the MAD macroblock 428 isbypassed to the interleaver 470. The interleaver 470 then interleavesthe MAD macroblock 426 with a fixed value that is ignored by the alphablender 480 to generate the interleaved macroblock 442. The deinterlacedlines of interleaved macroblock 442 are then blended with thedeinterlaced lines of DRIN macroblock 422 using an alpha value that isdetermined by the noise calculation 482 and the pixel error macroblock461, as described above. The noise reduced lines of the outputmacroblock 446 default to the target macroblock 252 lines interleavedinto macroblock 422 by the DRIN module by the alpha blender 480. Becauseof this, these lines are not noise reduced for the scene change case.After receiving the blended macroblock 446, the writer 492 divides upthe blended macroblock 446 into the deinterlaced macroblock of thetarget frame that is stored as part of data for the F_(DI)(N), and thenoise reduced macroblock of the target frame that is stored as part ofdata for the F_(NR)(N). As described above in detail, no noise reductionis performed for the interlaced field F(N) of the target frame 940B whena scene change occurs.

FIG. 9C is a diagram illustrating reference frames for deinterlacing atarget frame 940C when a scene change is detected in an output frame930C (preceding the target output frame 940C). The previous frame 930Cis deinterlaced as described with reference to FIG. 9B. Whendeinterlacing the target frame 940C, the DRIN macroblock 422 isgenerated in a manner substantially similar to the manner describedabove with reference to FIGS. 9A and 9B. The RMCD macroblock 424 is alsogenerated by the RMCD module 430 as explained above with reference toFIG. 9A. To generate the MAD macroblock 426, the interlaced field F(N+1)of the first subsequent output frame 950C and the interlaced fieldF(N+2) of the second subsequent output frame 960C is used. Specifically,the selector fetcher 850 retrieves a macroblock of the second subsequentoutput frame 960C from a location corresponding to the target macroblock252 instead of from the second previous output frame. Other than thisdifference, the MAD macroblock 426 is generated in a mannersubstantially similar to the manner described above with reference toFIG. 9A.

The selector 460, the multiplexer 450, the interleaver 470, the scenechange detector 490, the alpha blender 480, and the writer 492 performthe functions and operations substantially similar to the functions andoperations described above with reference to FIGS. 2 to 9A.

Method of Operating the Media Processor in Multiple Modes

FIG. 10 is a flow chart illustrating an embodiment of operating themedia processor 100 in different modes. In the embodiment of FIG. 10,the media processor 100 operates in four modes. The first mode is theencoding/transcoding mode where the video sequence is encoded ortranscoded without using the image processor 180. The other three modesare the deinterlacing mode, the field noise reduction mode, and theframe noise reduction mode. The deinterlacing mode may perform thedeinterlacing as well as the field noise reduction.

First, it is determined 1010 whether the media processor 100 is in theencoding/transcoding mode. If the media processor 100 is in theencoding/transcoding mode, a first set of reference frames is selectedaccording to the encoding or transcoding scheme performed. The encodingtranscoding modules 220 of the encoder/transcoder 160 receives, amongothers, the motion vector 260, and the predictor and residual 261 fromthe motion estimation engine 230, and the target macroblock 252 from themacroblock fetcher 210 to perform the encoding/transcoding process.

If the media processor 100 is not in the encoding/transcoding mode, itis determined 1030 whether the media processor 100 is in thedeinterlacing mode. If the media processor 100 is in the deinterlacingmode, a second set of reference frames is retrieved and used fordeinterlacing. The second set of reference frames, for example, includethe first previous field F(N−1), the second previous field F(N−2), andthe first subsequent field F(N+1) when the scene change is not detectedin the target field F(N) or the first previous field F(N−1), asexplained above with reference to FIG. 9A.

If the media processor 100 is not in the encoding/transcoding mode norin the deinterlacing mode, it is determined 1050 whether the mediaprocessor 100 is in the field noise reduction mode. If the mediaprocessor 100 is in the field noise reduction mode, the third set ofreference frames is retrieved and used 1060, as explained below indetail with reference to FIGS. 16, 17 and 19. The third set of referenceframes, for example, includes the first previous field F(N−1), and thesecond previous field F(N−2). The field noise reduction mode is distinctfrom the deinterlacing mode. In the field noise reduction mode, onlyfield noise reduction is performed. No deinterlacing is performed in thefield noise reduction mode.

If the media processor 100 is not in the encoding/transcoding mode, thedeinterlacing mode, or the field noise reduction mode, the mediaprocessor 100 is determined to be in the frame noise reduction mode. Inthe frame noise reduction mode, a fourth set of reference frames isretrieved and used 1070 for processing, as explained below in detailwith reference to FIGS. 17 to 19. The fourth set of reference framesinclude, for example, the first previous frame Frame(N−1).

Method of Deinterlacing Interlaced Target Frame

FIGS. 11A and 11B are flow charts illustrating an embodiment of a methodfor deinterlacing the interlaced target field F(N). First, the referenceframes to be used are determined 1105 based on whether a scene change isdetected by the scene change detector 490, as explained in detail withreference to FIG. 12. Then, the target macroblock 252 and macroblocksfrom the reference frames (as determined in the step 1105) are fetchedfrom the memory 190 by the macroblock fetcher 210, the search bufferfetcher 360, the next field fetcher 720, and the selector fetcher 850.Then the motion estimation 1120 is performed by the motion estimationengine 230, as described in detail with reference to FIG. 13. Based onthe predictors generated by the motion estimation engine 230, the RMCDmacroblock 424 is generated 1125. Also, the MAD macroblock 426 isgenerated 1125 from the MVZ macroblock 336 from the motion estimationengine 230. Then, for each pixel of the missing lines in the targetoutput frame Frame(N), it is determined 1135 whether to use a pixel fromthe RMCD macroblock 424 or to use a pixel from the MAD macroblock 426 togenerate a multiplexer macroblock 428, as explained in detail below withreference to FIG. 14. Then the multiplexer macroblock 428 is interleavedwith the MP predictor 332 to generate 1135 the interleaved macroblock442.

Next, the DRIN macroblock 422 is generated 1140 by the DRIN macroblock422. As explained above with reference to FIG. 5, the intermediatemacroblock 530 is generated by the directionally interpolated macroblockgenerator 520. Then, the intermediate macroblock 530 is interleaved withthe target macroblock 252 to generate the DRIN macroblock 422.

The DRIN macroblock 422 is then blended 1150 with the interleavedmacroblock 442 by the alpha blender 480 to reduce noise in the pixels ofinterlaced field F(N) of the target frame Frame(N) and generate pixelsfor the missing lines of the target frame Frame(N) in the same pass asexplained in detail below with reference to FIG. 15.

After writing the blended macroblock 446 to the memory 190, it isdetermined 1165 whether the target macroblock was the last macroblock ofthe target field F(N). If not, the process returns to the step 1110 tofetch the next target macroblock and repeat the steps of 1120 to 1160.

If it is determined 1165 that the last macroblock of the target fieldF(N) is reached, then it is determined 1170 whether the target fieldF(N) is a telecine processed frame. If the target field F(N) is telecineprocessed frame, then the process proceeds to telecine processing 1175.The telecine processing 1175 for telecine frames continues until the endof the telecine frames is detected. Then, the process proceeds to thestep of determining 1190 if there are any adjustments needed to thealpha lookup table 484 based on the noise measurement. Increased noisein the video means the decision either that an alpha value should beselected from the alpha lookup table 484 to blend towards pixels fromthe RMCD module 430 or that MAD module 440 needs to allow a bigger perpixel error in the macroblock 461 from the selector 460. If it isdetermined that the target frame is not a telecine processed frame theprocess proceeds to determine 1180 if a scene change is detected.

The scene change in the target field F(N) is detected by the scenechange detector 490. If the scene change is detected in the target fieldF(N), scene change processing 1185 of the target field F(N) isperformed. In the step 1185, the process explained above with referenceto FIG. 9B is performed. Specifically, the directional interpolation andthe motion adaptive deinterlacing is repeated on the target field F(N).As explained above with reference to FIG. 9B, the interleaver macroblock442 is forced to use only the MAD macroblock 426 and interleaved with aconstant dummy value. The interleaver macroblock 442 is blended with theDRIN macroblock 422 in the alpha blender 480 for the generateddeinterlaced lines while the rest of the lines of pixels are takendirectly from the target macroblock 252 from the DRIN macroblock 422 asnoise reduction is not performed for scene changes. Therefore, the newblended macroblock 446 generated overwrites the previous macroblockwritten to the memory 190 in the step 1160. Scene change processing 1185must follow determination 1165 whether the last macroblock of the targetfield F(N) is reached because the scene detection is not based on theSAD of one target macroblock 252, but based on the SAD of all the targetmacroblocks 252 of the target field F(N). The scene changes occurinfrequently. Therefore, it is more efficient to deinterlace the targetfield F(N) based on the assumption that the scene change will not occurin the target field F(N) and later correct (by overwriting themacroblocks) if it is later determined that the scene change hasoccurred in the target frame.

If the noise level for the input video has changed, then the alphalook-up table 484 of the alpha blender 480 is adjusted 1195 accordinglyso that the correct amount of pixels from macroblocks created by theRMCD module 430 and the MAD module 440 is used to generate the blendedmacroblock 446. Then the process proceeds 1197 to the next frame andreturns to determining 1105 the reference frames to be used where thereference frames for the target frame is determined. The processes ofgenerating RMCD and MAD macroblocks 1125 to the generating 1135 of theinterleaved macroblock can be performed in parallel with the generation1140 of the DRIN macroblock.

FIG. 12 is a flow chart illustrating in detail the step 1105 fordetermining the reference frames shown in FIG. 11A. First, it isdetermined 1220 whether a scene change was detected during theprocessing of the previous target output frame Frame(N−1) in the step1180 of FIG. 11B. If the scene change was detected in the previoustarget output frame Frame(N−1) (i.e., the target frame of the previouspass), then the deinterlacing process described above with reference toFIG. 9C is implemented. Accordingly, the noise reduced field F_(NR)(N−1)of the previous frame, the deinterlaced field F_(DI)(N−1), the firstsubsequent field F(N+1), and the second subsequent field F(N+2) are usedin the following steps 1110 to 1185. If the scene change was notdetected in the previous target frame Frame(N−1), then the deinterlacingprocess explained above with reference to FIG. 9A is implemented.Accordingly, the noise reduce field F_(NR)(N−2) of the second previousframe, the noise reduced field F_(NR)(N−1) of the first previous frame,the deinterlaced field F_(DI)(N−1) of the first previous frame, and theinterlaced field of the next field F(N+1) are used in the followingsteps 1110 to 1185. Note that the case where the scene change wasdetected in the target frame was discussed above with reference to thesteps 1180 and 1185.

FIG. 13 is a flow chart illustrating in detail the step 1120 forperforming the motion estimation as shown in FIG. 11A. First, the datasegments of reference fields (i.e., F_(DI)(N−1) and F_(NR)(N−1)) arestored 1310 on the first and second rolling buffers 352, 354. Then thetarget macroblock 252 is retrieved from the memory 190 and stored 1320in the macroblock buffer 310. The full-pel search is performed 1330 todetermine the motion vectors for the best matching macroblock in thedata segments of the reference frames. Then the sub-pel search isperformed 1340 to generate motion vectors of non-integer values. Basedon the full-pel search and the sub-pel search, the MP predictor 332 andthe IP predictor 334 are generated 1350.

FIG. 14 is a flow chart illustrating in detail the step 1130 fordeciding between a pixel from the RMCD macroblock 424 and the MADmacroblock 426 as shown in FIG. 11A. First, the RMCD error 822 for eachtarget pixel is calculated 1410. Specifically, the RMCD error 822 iscalculated from a maximum difference 444 of pixels of the targetmacroblock 252 and corresponding pixels of the MP predictor 332, acrossa five-pixel window by the RMCD error calculator 820 as described abovewith reference to FIG. 8. The five-pixel window includes the targetpixel, two pixels to the left of the target pixel, and two pixels to theright of the target pixel. If pixels to the left or right areunavailable because the pixels go beyond what is provided by thedifference 444, then the closest available pixels are duplicated as asubstitute.

The MAD error 824 for each target pixel is calculated 1420 as describedabove with reference to FIG. 8. Specifically, the first windowcomparator 830 calculates the first difference 832 which is the maximumdifference between pixels in the target window of the MVZ macroblock andthe corresponding pixels in the next field window of the next macroblock724. The target field window includes the target pixel, two pixels tothe left of the target pixel, and two pixels to the right of the targetpixel. If pixels to the left or right are unavailable because the pixelsgo beyond what is provided by the difference 444, then the closestavailable pixels are duplicated as a substitute. Then the second windowcomparator 840 calculates a second difference 842 in the target windowbetween the target field window and a second previous field windowincluding pixels of the second previous macroblock 826 at locationscorresponding to the physical pixel locations directly above and belowthe pixels in the target field window 842. The target field windowincludes the location above or below the target pixel, two pixels to theleft of that location, and two pixels to the right of that location. Ifpixels to the left or right are unavailable because the pixels go beyondwhat is provided by the difference, then the closest available pixelsare duplicated as a substitute. The MAD error selector 860 chooses thehigher value of the first difference 832 and the second difference 842as the MAD error 824.

Then the RMCD error 822 is compared 1430 with the MAD error 824. If theRMCD error 822 is less than the MAD error 824, then the pixel of theRMCD macroblock 424 is used 1450 as the pixel for the target pixel andthe RMCD error is passed as 461. If the RMCD error 822 is greater thanor equal to the MAD error 824, then the pixel of the MAD macroblock 426is used 1440 as the pixel for the target pixel and the MAD error ispassed as 461.

FIG. 15 is a flow chart illustrating in detail the step 1150 forblending as shown in FIG. 11B. First, the Selector 460 determines 1520the minimum error 461 for either RMCD or MAD and passes the error on aper pixel basis to the alpha look-up table 484. Next, the alpha valuefor each pixel is determined 1540 based on the error macroblock 461 andthe noise calculation 482. Continuing on, the generated deinterlacedoutput lines of DRIN macroblock 422 are blended 1560 with theinterleaved macroblock 442 using the alpha value to generate the blendedmacroblock 446. The noise reduced output lines of DRIN macroblock 422are blended with the interleaved macroblock 442.

Field Noise Reduction Mode and Frame Noise Reduction Mode

FIG. 16 is a block diagram illustrating an embodiment of a motionestimation engine 1630 for performing the field noise reduction. Themotion estimation engine 1630 of FIG. 16 is substantially the same asthe motion estimation engine 230 of FIG. 3 except that (i) the searchbuffer fetcher 360 retrieves a first data segment of the noise reducedfield F_(NR)(N−1) (stored in the first rolling buffer 352) and a seconddata segment of the noise reduced field F_(NR)(N−2) (stored in thesecond rolling buffer 354), (ii) the predictor generator 330 generates afirst predictor MP_(FD) 1632 from either the first or second datasegments that best matches the target macroblock 252 (the IP predictorand the MVZ macroblock are not generated by the predictor generator 330or generated but not used). The size of the predictor MP_(FD) 1632 andthe target macroblock 252 are the same, for example, 16×16 pixels.

FIG. 17 is a block diagram illustrating an embodiment of the imageprocessor 180 operating in the field noise reduction mode. The modulesand the macroblocks active in the field noise reduction mode are shownin solid lines whereas the modules and macroblocks inactive in the fieldnoise reduction mode are shown in dashed lines. Specifically, the MADmodule 440, the multiplexer 450, and the selector 460 are deactivated inthe field noise reduction mode. The DRIN module 420 only bypasses thetarget macroblock 1652 to the alpha blender 480 and does not generatethe DRIN module 420. Therefore, the input to the DRIN module 420 and theoutput from the DRIN module 420 are identical (both shown in FIG. 17,for example, as having 16×16 pixels). The RMCD module 430 bypasses theMP_(FD) predictor 1632 to the interleaver 470. The RMCD module 430 alsogenerates a difference macroblock 1744 and sends it to the alpha blender480 and the scene change detector 490. The interleaver 470 bypasses theMP_(FD) predictor 1632 to the alpha blender 480. In the noise reductionmode, the interleaver 470 does not interleave macroblocks.

The RMCD module 430 generates a difference macroblock 1744 which is sentto the alpha blender 480. The difference macroblock 1744 is a macroblockgenerated by subtracting the luminance or chroma value of each pixels ofthe target macroblock 1652 from the luminance or chrominance values ofcorresponding pixels in the MP_(FD) macroblock, as explained above withreference to FIG. 6. The alpha blender 480 then determines the per pixelalpha value for blending the target macroblock 1652 with the MP_(FD)predictor 1632 based on the result of the noise calculation module 482and the difference 1744. The blended macroblock 1746 is then sent to thewriter 492. The writer 492 stores the blended macroblock 1746 on thememory 190.

FIG. 18 is a block diagram illustrating an embodiment of a motionestimation engine 230 for performing the frame noise reduction. Theframe noise reduction mode is used for reducing noise in the videosequence comprised only of frames. The motion estimation engine 230 ofFIG. 18 is substantially the same as the motion estimation engine 230 ofFIG. 16 except that (i) the search buffer fetcher 360 retrieves only adata segment from the first previous frame Frame(N−1) and stores it inthe first rolling buffer 352, and (ii) the predictor generator 330generates a predictor MP_(FM) 1832 from the data segment. The secondrolling buffer 354 is deactivated. Like the embodiment of FIG. 16, thesize of the MP_(FM) predictor 1832 and the size of a target macroblock1852 are the same, for example, both 16×16 pixels.

The image processor 180 coupled to the motion estimation 230 of FIG. 17for performing the frame noise reduction is substantially the same asthe image processor 180 of FIG. 17 except that the MP_(FM) predictor1832 is used in place of the MP_(FD) predictor 1632.

FIG. 19 is a flow chart illustrating an embodiment for performing thefield noise reduction or the frame noise reduction. First, the targetmacroblock 1652 or 1852 and the data segment(s) for the rolling searchbuffer 350 is (are) retrieved 1910 from the memory 190. For the fieldnoise reduction, the data segment of the noise reduced field F_(NR)(N−1)and the data segment of the noise reduced field F_(NR)(N−2) areretrieved as explained above with reference to FIG. 16. For the framenoise reduction, the data segment of the previous frame Frame(N−1) isretrieved, as explained above with reference to FIG. 18.

Next, the motion estimation is performed 1920 on the retrieved datasegments to generate the predictors (the MP_(FD) 1632 for the fieldnoise reduction or the MP_(FM) 1832 for the frame noise reduction). Thedifference between the target macroblock 1652 or 1852 and the predictors(the MP_(FD) 1632 or the MP_(FM) 1832) are determined 1930 by generatinga difference macroblock 1744. Based on the difference macroblock 1744and the noise calculation, the alpha value for blending the targetmacroblock 1652 or 1852 with the predictors (the MP_(FD) predictor 1632or the MP_(FM) predictor 1832) is determined 1940 from the look-up table484. The target macroblock 1652 or 1852 is blended 1950 with the MP_(FD)predictor 1632 or the MP_(FM) predictor 1832 to generate the blendedmacroblock 1746. The writer 492 then writes 1960 the blended macroblock1746 to the memory 190. It is thereafter determined 1970 whether thenoise reduction processing of the target field or the target frame isfinished. If processing of the target field or the target frame is notfinished, the process proceeds 1975 to the next target macroblock. Ifthe processing of the target field or the target frame is finished, thenit is determined 1980 whether the end of the video sequence has beenreached. If not, the process proceeds 1990 to the next target frame orfield. If the end of the video sequence has been reached, the noisereduction process is terminated.

An advantage of the above described embodiments is that the same motionestimation engine 230 and the image processor 180 are used for at leasttwo different modes. Therefore, the hardware resources of the mediaprocessor 100 are efficiently used. Another advantage of the embodimentsis that in the deinterlacing mode, the noise reduction is performed onthe interlaced field of the target field in the same pass in which thedeinterlacing is performed. Therefore, the media processor 100 moreefficiently processes the video sequence. Yet another advantage of theembodiments is that the field noise reduction and the frame noisereduction are performed using the same estimation engine 230 and theimage processor 180.

Alternate System (or Method) Embodiments

In one embodiment, the modules of the media processor 100 may beimplemented in different physical devices. For example, the decoder 120,the scaler 140 and the memory 190 may be implemented in the form of apersonal computer whereas the encoder/decoder 160 and the imageprocessor 180 are implemented in the form of an integrated chip.

In one embodiment, only full-pel search is performed by the searchmodule 320 in the deinterlacing mode. In this case, the MP and IPpredictors fall on integer pixel boundaries. Also, the MVZ macroblock336 may be provided from the rolling search buffer 350 or from thesearch buffer fetcher 360. Alternatively, the image processor 180 mayinclude a fetcher directly retrieving the MVZ macroblock 336 from thememory 190.

The various embodiments disclosed herein may be implemented using one ormore hardware elements. In general, a hardware element may refer to anyhardware structures arranged to perform certain operations. In oneembodiment, for example, the hardware elements may include any analog ordigital electrical or electronic elements fabricated on a substrate. Thefabrication may be performed using silicon-based integrated circuit (IC)techniques, such as complementary metal oxide semiconductor (CMOS),bipolar, and bipolar CMOS (BiCMOS) techniques, for example. Examples ofhardware elements may include processors, microprocessors, circuits,circuit elements (e.g., transistors, resistors, capacitors, inductors,and so forth), integrated circuits, application specific integratedcircuits (ASIC), programmable logic devices (PLD), digital signalprocessors (DSP), field programmable gate array (FPGA), logic gates,registers, semiconductor device, chips, microchips, chip sets, and soforth. The embodiments are not limited in this context.

Various embodiments may be implemented using one or more softwareelements. In general, a software element may refer to any softwarestructures arranged to perform certain operations. In one embodiment,for example, the software elements may include program instructionsand/or data adapted for execution by a hardware element, such as aprocessor. Program instructions may include an organized list ofcommands comprising words, values or symbols arranged in a predeterminedsyntax, that when executed, may cause a processor to perform acorresponding set of operations.

The software may be written or coded using a programming language.Examples of programming languages may include C, C++, BASIC, Perl,Matlab, Pascal, Visual BASIC, JAVA, ActiveX, assembly language, machinecode, and so forth. The software may be stored using any type ofcomputer-readable media or machine-readable media. Furthermore, thesoftware may be stored on the media as source code or object code. Thesoftware may also be stored on the media as compressed and/or encrypteddata. Examples of software may include any software components,programs, applications, computer programs, application programs, systemprograms, machine programs, operating system software, middleware,firmware, software modules, routines, subroutines, functions, methods,procedures, software interfaces, application program interfaces (API),instruction sets, computing code, computer code, code segments, computercode segments, words, values, symbols, or any combination thereof. Theembodiments are not limited in this context.

As noted previously, some embodiments may be implemented, for example,using any computer-readable media, machine-readable media, or articlecapable of storing software. The media or article may include anysuitable type of memory unit, memory device, memory article, memorymedium, storage device, storage article, storage medium and/or storageunit, such as any of the examples described with reference to a memory.The media or article may comprise memory, removable or non-removablemedia, erasable or non-erasable media, writeable or re-writeable media,digital or analog media, hard disk, floppy disk, Compact Disk Read OnlyMemory (CD-ROM), Compact Disk Recordable (CD-R), Compact DiskRewriteable (CD-RW), optical disk, magnetic media, magneto-opticalmedia, removable memory cards or disks, various types of DigitalVersatile Disk (DVD), subscriber identify module, tape, cassette, or thelike. The instructions may include any suitable type of code, such assource code, object code, compiled code, interpreted code, executablecode, static code, dynamic code, and the like. The instructions may beimplemented using any suitable high-level, low-level, object-oriented,visual, compiled and/or interpreted programming language, such as C,C++, Java, BASIC, Perl, Matlab, Pascal, Visual BASIC, JAVA, ActiveX,assembly language, machine code, and so forth. The embodiments are notlimited in this context.

Unless specifically stated otherwise, it may be appreciated that termssuch as “processing,” “computing,” “calculating,” “determining,” or thelike, refer to the action and/or processes of a computer or computingsystem, or similar electronic computing device, that manipulates and/ortransforms data represented as physical quantities (e.g., electronic)within the computing system's registers and/or memories into other datasimilarly represented as physical quantities within the computingsystem's memories, registers or other such information storage,transmission or viewing devices. The embodiments are not limited in thiscontext.

As used herein any reference to “one embodiment” or “an embodiment”means that a particular element, feature, structure, or characteristicdescribed in connection with the embodiment is included in at least oneembodiment. The appearances of the phrase “in one embodiment” in variousplaces in the specification are not necessarily all referring to thesame embodiment.

As used herein, the terms “comprises,” “comprising,” “includes,”“including,” “has,” “having” or any other variation thereof, areintended to cover a non-exclusive inclusion. For example, a process,method, article, or apparatus that comprises a list of elements is notnecessarily limited to only those elements but may include otherelements not expressly listed or inherent to such process, method,article, or apparatus. Further, unless expressly stated to the contrary,“or” refers to an inclusive or and not to an exclusive or. For example,a condition A or B is satisfied by any one of the following: A is true(or present) and B is false (or not present), A is false (or notpresent) and B is true (or present), and both A and B are true (orpresent).

Also, use of the “a” or “an” are employed to describe elements andcomponents of embodiments of the present invention. This was done merelyfor convenience and to give a general sense of the embodiments of thepresent invention. This description should be read to include one or atleast one and the singular also includes the plural unless it is obviousthat it is meant otherwise.

Upon reading this disclosure, those of skill in the art will appreciatestill additional alternative structural and functional designs for asystem and a process for performing motion estimation, deinterlacing, ornoise reduction through the disclosed principles herein. Thus, whileparticular embodiments and applications have been illustrated anddescribed, it is to be understood that the present invention is notlimited to the precise construction and components disclosed herein andthat various modifications, changes and variations which will beapparent to those skilled in the art may be made in the arrangement,operation and details of the method and apparatus of the embodimentsdisclosed herein without departing from the spirit and scope as definedin the appended claims.

What is claimed is:
 1. A video deinterlacer for deinterlacing a videosequence, the video sequence including a target input field andreference fields the video deinterlacer comprising: a motion estimationengine configured to generate a predictor for a target data segment ofan interlaced field of a target output frame from the reference fields,the predictor representing a data segment of the reference fields thatbest matches the target data segment; an image processor coupled to themotion estimation engine and comprising: a directional interpolationmodule configured to generate a first pixel of a deinterlaced field byperforming directional interpolation on the interlaced field of thetarget output frame; a recursive motion compensation deinterlacingmodule configured to generate a second pixel of the deinterlaced fieldof the target output frame by performing motion compensation on theinterlaced field of the target output frame using at least thepredictor, a location of the second pixel in the deinterlaced field sameas a location of the first pixel in the deinterlaced field; a motionadaptive module configured to generate a third pixel of the deinterlacedfield of the target output frame by performing blending based on pixelsof the reference fields, a location of the third pixel in thedeinterlaced field same as the location of the first and second pixelsin the deinterlaced field; an interleaver configured to generate anintermediate data segment by at least interleaving a pixel of thepredictor and the second pixel or the third pixel; and a blenderconfigured to reduce noise in an output data segment by at leastblending the first pixel and a pixel of the intermediate data segment ata location same as the first pixel.
 2. The video deinterlacer of claim1, wherein the motion estimation engine comprises: a reference bufferconfigured to store the reference fields, each reference fieldcomprising reference data segments; a target buffer configured to storea target data segment of the interlaced field of the target outputframe; a search module coupled to the reference buffer and the targetbuffer, the search module configured to determine a predictor motionvector between the target data segment and the reference data segmentthat best matches the target data segment; and a predictor generatorcoupled to the search module and the reference buffer, the predictorgenerated configured to generate the predictor from the predictor motionvector.
 3. The video deinterlacer of claim 1, wherein the imageprocessor further comprises a selector module configured to choosebetween the second pixel and the third pixel for interleaving with thepixel of the predictor by comparing a recursive motion compensateddeinterlacing (RMCD) error and a motion adaptive deinterlacing (MAD)error, the RMCD error representing a difference between the secondtarget pixel and a corresponding pixel in the predictor, the MAD errorrepresenting a maximum difference between pixels in adjacent referencefields of the target input field at the same location as the thirdpixel, and differences between a pixel corresponding to the third pixelin a reference field preceding one of the adjacent reference fields andthe target pixels above or below the third pixel.
 4. The videodeinterlacer of claim 1, wherein the alpha blending module is configuredto blend the first pixels with the intermediate data segment based onweights given to the first pixel and the second or third pixel, theweights determined by an amount of error in the pixel and an amount ofnoise in the video sequence.
 5. The video deinterlacer of claim 1,wherein the image processor further comprises a scene change detectorcoupled to the recursive motion compensation module for detecting achange in a scene based on a difference between the predictor and thetarget data segment of the interlaced field.
 6. The video deinterlacerof claim 1, further comprising a telecine detector for determiningwhether the target input frame is part of a telecine processed videosequence by comparing pixels of the reference fields with each other andwith the corresponding pixels of the target input field.
 7. The videodeinterlacer of claim 1, wherein the motion estimation engine is furtherconfigured to generate a sub-pel predictor for a target data segmentfrom the reference fields, the sub-pel predictor representing a datasegment generated by interpolating the reference fields that bestmatches the target data segment at a sub-pel level.
 8. A method ofdeinterlacing an interlaced video sequence including interlaced targetinput frame and reference frames, the method comprising: generating apredictor for a target data segment of the interlaced field of a targetoutput frame from the reference fields, the predictor representing adata segment of the reference fields that best matches the target datasegment; generating a first pixel of a deinterlaced field by performingdirectional interpolation on the interlaced field of the target outputframe; generating a second pixel of the deinterlaced field of the targetoutput frame by performing motion compensation on the interlaced fieldof the target frame using at least the predictor, a location of thesecond pixel in the deinterlaced field same as a location of the firstpixel in the deinterlaced field; generating a third pixel of thedeinterlaced field of the target output frame by performing blendingbased on pixels of the reference fields, a location of the third pixelin the deinterlaced field same as the location of the first and secondpixels in the deinterlaced field; interleaving the predictor and thesecond pixel or the third pixel to generate an intermediate datasegment; and reducing noise in an output data segment by blending thefirst pixel and a pixel of the intermediate data segment at a locationsame as the first pixel to generate a pixel of an output data segment.9. The method of claim 8, further comprising choosing between the secondpixel and the third pixel for interleaving with the pixel of thepredictor by comparing a recursive motion compensated deinterlacing(RMCD) error and a motion adaptive deinterlacing (MAD) error, the RMCDerror representing a difference between the target pixel and acorresponding pixel in the predictor, the MAD error representing amaximum difference between pixels in reference fields adjacent thetarget input field at the same location as the third pixel, anddifferences between the pixels above and below the third pixel locationin a reference field preceding one of the adjacent reference fields andthe corresponding target pixels above or below the third pixel.
 10. Themethod of claim 9, further comprising blending the first pixel with thesecond or third pixel with weights given to the first pixel and thesecond or third pixel determined by the corresponding RMCD error or MADerror.
 11. The method of claim 8, further comprising detecting a scenechange based on a difference between the predictor and the target datasegment of the target field.
 12. The method of claim 8, furthercomprising determining whether the target input frame is part of atelecine video sequence by comparing pixels of the second previousreference field and the pixels of the target field and comparing thepixels of the adjacent reference fields.
 13. The method of claim 8,further comprising generating a sub-pel predictor for a target datasegment from the reference data of the reference fields, the sub-pelpredictor representing a data segment generated by interpolating thereference fields to create the best match for the target data segment ata sub-pel level.
 14. A method of deinterlacing an interlaced videosequence including a target frame and reference frames, the methodcomprising: generating a deinterlaced field of the target frame from aninterlaced target field of the target output frame, an interlaced fieldof a first previous output frame preceding the target frame, adeinterlaced field of the first previous output frame, an interlacedfield of a second previous output frame preceding the first previousoutput frame, and a first subsequent interlaced field, responsive to ascene change not being detected in the target frame or the firstprevious output frame; and generating the deinterlaced field of thetarget output frame from the interlaced field of the target outputframe, the interlaced field of the first subsequent output framesubsequent to the target output frame, an interlaced field of a secondsubsequent output frame subsequent to the first subsequent output frame,the interlaced field of the first previous output frame, and thedeinterlaced field of the first previous output frame, responsive to thescene change being detected in the first previous output frame.
 15. Themethod of claim 14, further comprising: generating the deinterlacedfield of the target frame from the interlaced field of the target outputframe, the interlaced field of the second subsequent output frame, andan interlaced field of a third subsequent output frame subsequent to thesecond subsequent output frame, responsive to detecting the scene changein the target frame.
 16. The method of claim 14, further comprisingperforming noise reduction of the interlaced field of the target outputframe using the interlaced field and deinterlaced field of the firstprevious output frame.